//
//  a.m
//  ClockIn v2
//
//  Created by Tomy on 12/11/2020.
//

#import "Utility.h"

@implementation Utility

static CGFloat _topBarWidth;

+ (void)addGradientLayerToView:(UIView *)view {
    CAGradientLayer *gradient = [CAGradientLayer layer];
    gradient.frame = view.bounds;
    
    gradient.startPoint = (CGPoint){0.0, 0.0};
    gradient.endPoint = (CGPoint){1.0, 1.0};
    
    gradient.colors = @[(id)[UIColor orangeColor].CGColor, (id)[UIColor yellowColor].CGColor];
    [view.layer insertSublayer:gradient atIndex:0];
}

+ (CGFloat)getTopBarWidth {
    return _topBarWidth;
}

+ (void)setTopBarWidth:(CGFloat)topBarWidth {
    _topBarWidth = topBarWidth;
}

@end
